]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Fix exception when showing menu for not-running app
authorColin Walters <walters@verbum.org>
Mon, 5 Oct 2009 20:01:40 +0000 (16:01 -0400)
committerColin Walters <walters@verbum.org>
Tue, 6 Oct 2009 21:19:36 +0000 (17:19 -0400)
Need to check windows.length before checking first window.

https://bugzilla.gnome.org/show_bug.cgi?id=597466

js/ui/appIcon.js

index d7dbd7726110070f67ca6e4738312162b400a130..760971e2057265d276b94498f418299a1720a0c3 100644 (file)
@@ -440,7 +440,7 @@ AppIconMenu.prototype = {
         // Display the app windows menu items and the separator between windows
         // of the current desktop and other windows.
         let activeWorkspace = global.screen.get_active_workspace();
-        let separatorShown = windows[0].get_workspace() != activeWorkspace;
+        let separatorShown = windows.length > 0 && windows[0].get_workspace() != activeWorkspace;
 
         for (let i = 0; i < windows.length; i++) {
             if (!separatorShown && windows[i].get_workspace() != activeWorkspace) {